package com.zjd.swing.browser;

import javax.swing.*;
import java.awt.*;

/**
 * @Description: 浏览器窗口
 * @Author: sobey
 * @Email: sobey178@163.com
 * @Date: 2022/3/28 10:38
 */
public class MyBrowserJFrame extends JFrame {
    public MyBrowserJFrame(String title,String url) throws HeadlessException {
        super(title);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setMinimumSize(new Dimension(1000,800));
        MyBrowserJPanel browserJPanel = new MyBrowserJPanel(url);
        getContentPane().add(browserJPanel, BorderLayout.CENTER);
        setExtendedState(JFrame.MAXIMIZED_BOTH);
        setLocationByPlatform(true);
        setVisible(true);
    }
}
